<%@page import="java.io.StringWriter"%>
<%@page import="com.ibm.pim.common.ValidationError"%>
<%@page import="com.ibm.pim.common.ExtendedValidationErrors"%>
<%@page import="com.ibm.pim.catalog.Catalog"%>
<%@page import="com.ibm.pim.catalog.CatalogManager"%>
<%@page import="com.ibm.pim.catalog.item.Item"%>
<%@page import="com.ibm.pim.integration.CMSContentURN"%>
<%@page import="java.io.OutputStream"%>
<%@page import="java.io.FileOutputStream"%>
<%@page import="java.io.FileInputStream"%>
<%@page import="com.ibm.pim.docstore.Document"%>
<%@page import="com.ibm.ccd.common.util.MultipartRequest"%>
<%@page import="java.io.InputStreamReader"%>
<%@page import="java.io.BufferedReader"%>
<%@page import="com.ibm.pim.context.PIMContextFactory"%>
<%@page import="com.ibm.pim.hierarchy.Hierarchy"%>
<%@page import="com.ibm.pim.hierarchy.HierarchyManager"%>
<%@page import="es.ibm.santillana.mdm.clonation"%>
<%@page import="com.ibm.pim.selection.StaticItemSelection"%>
<%@page import="com.ibm.pim.selection.Selection"%>
<%@page import="com.ibm.pim.selection.StaticSelection"%>
<%@page import="com.ibm.pim.system.UIHelper"%>
<%@page import="com.ibm.pim.context.Context"%>
<%@page import="java.util.Enumeration"%>
<%@page import="java.io.File"%>
<%@page import="java.io.FileReader"%>
<%@page import="javax.servlet.http.HttpServletRequest"%>


<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%
try {
	
	//InputStreamReader br = new InputStreamReader(file);
	//File file = null;
	
	%><html>
			<head>
			
			<LINK REL="StyleSheet" HREF="/style.css" TYPE="text/css">
			<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
			
			<script type="text/javascript" src="/suppliers/js/dojo-release-1.6.1/dojo/dojo.js">
		
				dojo.require("dijit.form.Form");
                dojo.require("dijit.form.Button");
                dojo.require("dijit.form.TextBox");
                dojo.require("dijit.form.ValidationTextBox");
            	dojo.require("dijit.form.DateTextBox");
				dojo.require("dijit.form.CheckBox");
				dojo.require("dijit.form.RadioButton");
 				dojo.require("dijit.form.Select");
				dojo.require("dijit.Dialog");	

				function AbreVentana(sUrl) {
					//sustituir ejemplo.html por la ruta y nombre de la pagina a cargar en la ventana
					window.open(sUrl, "_blank", "toolbar=no,menubar=no,directories=no,status=no,resizable=no,location=no,scrollbars=no");
				}
			</script>
			</head>
			<body class="claro">
			<%
				
				
					Context pimContext = PIMContextFactory.getPimContext();
					
					String sPk =request.getParameter("PK");//Recogemos el titulo	
					String URL = ClonationManagement.cloneItem(sPk);			
					
					
            				
			%>
				
					<table>
						
						<tr>
							
							
						</tr>
							
					</table>
				</div>
				<script type="text/javascript">
				//<!--
					alert('<%=URL%>');
					window.open(<%=URL%>, "_blank", "toolbar=no,menubar=no,directories=no,status=no,resizable=no,location=no,scrollbars=no");
					
				//-->
				</script>
			
			</body>
		</html>
	
		<%
	
	
	
} catch (Exception e) {
%>
	<body class="claro">
		<div><h1>Upload not complete</h1></div>
		 <p>ERROR <%=e.getMessage()%></p>
	</body>
<%	
}
%>
